/*
Copyright (C) 2010- Peter Bui and Aaron Dingler.
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/

#ifndef	__SMQ_CLIENT_H__
#define	__SMQ_CLIENT_H__

#include <int_sizes.h>
#include <link.h>

#define SMQ_CLIENT_CONNECT_FCFS	    0
#define SMQ_CLIENT_CONNECT_RANDOM   1

struct link* smq_client_connect(char *name, int check_name, int mode, int timeout);

int smq_client_create(struct link *l, char *buf, INT64_T timeout);

int smq_client_put_from_buffer(struct link *l, char *target, INT64_T timeout, char *header_buffer, int hlen, char *body_buffer, int blen);

int smq_client_put_from_file(struct link *l, char *target, INT64_T timeout, FILE* header_file, FILE* body_file);

int smq_client_bind_from_buffer(struct link *l, char *target, INT64_T timeout, char *script_buffer, char *script_name, int slen);

int smq_client_bind_from_file(struct link *l, char *target, INT64_T timeout, FILE* script_file, char *script_name);

int smq_client_unbind(struct link *l, char *target, INT64_T timeout, char *script_name);

int smq_client_bindings(struct link *l, char *target, INT64_T timeout);

int smq_client_list(struct link *l, char *target, INT64_T timeout);

int smq_client_flush(struct link *l, char *target, INT64_T timeout);

int smq_client_get(struct link *l, char *name, char *mid);

#endif

/* 
vim: sw=4 sts=4 ts=8 ft=cpp
*/
